import { ref } from 'vue';

export default function getMouseMove(){
    
// 创建两个值用来保存坐标
const clientX = ref(0);
const clientY = ref(0);

// 鼠标移动的事件回调函数
const mouseMove = (e: MouseEvent) => {
  clientX.value = e.clientX;
  clientY.value = e.clientY;
};

return {clientX,clientY,mouseMove}
}